package com.yorick.authority.modal.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.yorick.common.util.TrimmerDeserializer;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Getter
@Setter
public class BaseListRequest {
    @JsonProperty("currentPage")
    @NotNull
    @Max(100000)
    private int currentPage;
    @JsonProperty("pageSize")
    @NotNull
    @Max(100)
    @Min(-1)
    private int pageSize;
    @JsonProperty("keyword")
    @JsonDeserialize(using = TrimmerDeserializer.class)
    private String keyword;
}
